# 配置管理接口
from flask import Blueprint, request, jsonify
from utils.config import save_config

config_bp = Blueprint('config', __name__)


@config_bp.route('/config', methods=['PUT'])
def update_config():
    new_config = request.json
    save_config(new_config)
    return jsonify({'message': 'Configuration updated'}), 200
